package com.xnyzc.lhy.common.penum.work;

/**
 * @Description
 * @Author zhuyubin
 * @Date 2019-08-19 19:21
 **/
public enum EPunchType {

    goToWork(0, "上班打卡成功"),
    offWork(1, "下班打卡成功");

    private Integer type;
    private String desc;

    EPunchType(Integer type, String desc){
        this.type = type;
        this.desc = desc;
    }

    public static EPunchType findById(Integer type) {
        EPunchType[] values = EPunchType.values();
        for (EPunchType value : values) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }
    public Integer getType() {
        return this.type;
    }

    public String getDesc() {
        return this.desc;
    }
}
